Clinical Trials Tableau System API - Implementation Template
Setup guide
Downloading and Importing the Tableau Hyper API
This API uses the MuleSoft Tableau connector, which relies on the Tableau Java Hyper API that must be installed. Follow these instructions to install it.
- Download the Tableau Hyper API (Java - .zip) for the correct operating system.
- Extract the downloaded zip file to a location that is accessible and that you remember. Going forward, this location is referred to as hyper_api_dir.
- Change directories into the
hyper_api_dir
. - Install
tableauhyperapi.jar
in local maven. Run the following command.mvn install:install-file -Dfile="lib/tableauhyperapi.jar" -DgroupId="com.mulesoft.accelerator-lifesciences" -DartifactId="tableauhyperapi" -Dversion="0.1" -Dpackaging="jar"
- Install
jna-5.6.0.jar
in local maven. Run the following command.mvn install:install-file -Dfile="lib/jna-5.6.0.jar" -DgroupId="com.mulesoft.accelerator-lifesciences" -DartifactId="jna-5.6.0" -Dversion="0.1" -Dpackaging="jar"
Install tableauhyperapi-\.jar in local maven
For MacOS, run this command:mvn install:install-file -Dfile="lib/tableauhyperapi-macos.jar" -DgroupId="com.mulesoft.accelerator-lifesciences" -DartifactId="tableauhyperapi-os" -Dversion="0.1" -Dpackaging="jar"
For Linux, run this command:mvn install:install-file -Dfile="lib/tableauhyperapi-linux.jar" -DgroupId="com.mulesoft.accelerator-lifesciences" -DartifactId="tableauhyperapi-os" -Dversion="0.1" -Dpackaging="jar"
For Windows, run this command:mvn install:install-file -Dfile="lib/tableauhyperapi-windows.jar" -DgroupId="com.mulesoft.accelerator-lifesciences" -DartifactId="tableauhyperapi-os" -Dversion="0.1" -Dpackaging="jar"
Importing Templates into Anypoint Studio
- In Studio, click the Exchange X icon in the upper left of the taskbar.
- Log in with your Anypoint Platform credentials.
- Search for the template.
- Click Open.
Running Templates in Anypoint Studio
After you import your template into Studio, follow these configuration steps to run it:
HLS Clinical Trials Tableau System API Configuration
The application requires a few things to be configured, mainly the system API connection
information. Configure them in the properties file located in the config/properties
folder.
mule.env
is the environment where the application is to be deployed. For a studio deployment, the recommendedmule.env
value islocal
.mule.key
is the encryption key for securing sensitive properties.tableau.apiVersion
- sets the Tableau server version.tableau.server
- sets the Tableau server URL.tableau.projectName
- sets the Tableau project name to use. This can be found by logging into Tableau Server UI.tableau.userName
- sets the Tableau user name to use.tableau.workingDirectory
- sets the working directory for Tableau Hyper API. This should be set to thelib
directory in the Hyper API directory. This is within thehyper_api_dir
created in the Downloading and Importing the Tableau Hyper API section.tableau.hyperDirectory
- sets the hyper directory for Tableau Hyper API. This should be set to thelib/hyper
directory in the Hyper API directory. This is within thehyper_api_dir
created in the Downloading and Importing the Tableau Hyper API section.tableau.password
- sets the Tableau server password. It should be encrypted and configured inconfig-secured-<mule.env>.yaml
file.
Please refer to the attached link on how to secure the configuration properties.
HTTPS Configuration
https.host
— sets the service host interface. It should be configured inconfig-<mule.env>.yaml
file. (Default: 0.0.0.0 for all interfaces)https.port
— sets the HTTPS service port number. It should be configured inconfig-<mule.env>.yaml
file. (Default: 8082)- TLS Configuration - Keystore properties setup:
keystore.alias
- sets the alias to the keystore. It should be configured in theconfig-<mule.env>.yaml
file.keystore.path
- sets the path to the key file. Key should be available in/src/main/resources/keystore
. It should be configured in theconfig-<mule.env>.yaml
file.keystore.keypass
— sets keystore keypass to support HTTPS operation. It should be encrypted and configured inconfig-secured-<mule.env>.yaml
file.keystore.password
— sets keystore password to support HTTPS operation. It should be encrypted and configured inconfig-secured-<mule.env>.yaml
file.
Please refer to the attached link for instructions on how to generate the keystore.
Tested and verified
This solution was developed and tested on Anypoint Studio 7.15 and Mule Runtime 4.4.0.
Run it
- Right-click the template project folder.
- Hover your mouse over Run as.
- Click Mule Application (configure).
- Inside the dialog, select Environment and set the variable
mule.env
to the appropriate value (dev or local). - Inside the dialog, select Environment and set the variable
mule.key
to the property encryption key that you used to encrypt your secure properties. - Inside the dialog, go to Clear Application Data select always.
- Click Run.
Deployment instructions for CloudHub
This API cannot be deployed to CloudHub because of the dependency on the MuleSoft Tableau Connector. See the docs for the MuleSoft Tableau Connector for details.
Test the template
- Use Advanced Rest Client or Postman to send a request over HTTPS. The template includes a Postman collection in the
src/test/resources
folder. Update the collection variable(s) after successful import.